import request from '../../utils/request';
import axios from 'axios';
//获取宠物常识列表
export function getExperienceList() {
  return request({
    url: '/CommonSenseCards',
    method: 'get',
  });
}

//添加宠物常识
export function addExperience(data) {
  return request({
    url: '/CommonSenseCards',
    method: 'post',
    data,
  });
}

//删除宠物常识
export function delExperience(id) {
  return request({
    url: `/CommonSenseCards/${id}`,
    method: 'delete',
  });
}

//修改宠物常识
export function changeExperience(id, data) {
  return request({
    url: `/CommonSenseCards/${id}`,
    method: 'patch',
    data,
  });
}

//搜索宠物常识
export function searchExperience(value) {
  return request({
    url: `/CommonSenseCards?title_like=${value}`,
    method: 'get',
  });
}
